Skip to content

feat(usage): show account-specific remaining subscription quota - #472

Open
Adam-Dalloul wants to merge 111 commits into
spacering-net:mainfrom
Adam-Dalloul:remaining-quota-honest-panel
Open

Adam-Dalloul wants to merge 111 commits into
spacering-net:mainfrom
Adam-Dalloul:remaining-quota-honest-panel

Conversation

@Adam-Dalloul

@Adam-Dalloul Adam-Dalloul commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Show remaining subscription quota for the account a conversation actually uses, with reset windows and clear unavailable states. Supported sources are Claude, Codex, Grok, Cursor and OpenCode Go. Context occupancy is kept separate from subscription quota, and unsupported sources do not report invented percentages.

This combined branch includes the native account/setup work in #919 and the compatibility work in #470/#471. It retains native @ account selection, saved-account resume, guided sign-in/API-key setup, credential isolation and the task/model safeguards for native Claude account switching. Named-account quota reads use the same authentication resolution as launch; authentication changes invalidate cached quota.

The controls use the existing desktop/web UI, including phone layouts and Remote Control actions. Token Usage API-list estimates already shipped with #503; they remain separate from subscription charges and remaining quota. #669 adds cross-agent/context handoff on top of this branch.

Updated against v0.40.0 with its CLI/session changes preserved. Reusing a Default or named-account session does not transfer its ownership to a CLI run. Active CLI runs must finish before switching accounts.

Includes #1029: the Token Usage dropdown includes configured and historical custom agents, reported ACP usage is recorded, and recoverable isolated-Claude usage survives session continuations. Estimates remain based on public API-list rates.

Migration IDs from the previous published heads stay registered in chronological order. A terminal compatibility marker keeps account-schema backups distinct from v0.40, and #669 adds a later marker for handoff backups. Existing PR databases retain their applied migration history.

Validation for the v0.40 refresh: all-target server/MCP/CLI Clippy, TypeScript, production UI export and 837 combined UI regressions passed. Native migration and backup suites passed, including upgrades from both earlier PR schemas without renamed migration IDs. Token usage, recorded ACP usage, transcript and ZCode regressions passed. The standalone usage fix also passes the ordinary production server/MCP/CLI check without test-only features. An isolated server upgrade preserved the previous database, account bindings, commands, migration ledger and saved context files. Combined-branch HTTP/MCP and browser fixtures passed native task restoration, unavailable-model refusal, rollback, paged full-history and image handoff, named-account selection, draft/title preservation, fresh @ targeting, retry, restart and import deduplication. Desktop, 390/320px phone and Arabic RTL layouts were checked. A continued custom-Claude history retained its native token totals through handoff without adding overlapping ACP counters. These fixtures do not establish live provider sign-in/generation for every agent or OS. The platform CI matrix runs on this published head.

Maintainer edits are enabled. This PR must still be merged/released before the installed app receives these changes.

@Adam-Dalloul Adam-Dalloul changed the title Show remaining subscription only from official payloads Show remaining subscription from live official CLI payloads Aug 15, 2026
@Adam-Dalloul
Adam-Dalloul force-pushed the remaining-quota-honest-panel branch from 9f86b6a to 3b55c9f Compare August 16, 2026 17:01
Settings MCP still targets the built-in family row. Extra custom
agents whose spec.env sets CLAUDE_CONFIG_DIR, CODEX_HOME, GROK_HOME,
GEMINI_CONFIG_DIR, or OPENCODE_CONFIG_DIR now receive the same server
on upsert and lose it on remove.

Claude extra homes only get enabledPlugins; server defs stay in the
shared ~/.claude.json. Auth files are never copied.
Custom agents whose spec.env sets a family isolator now have a Sign in
card on the Agents page. That opens the official CLI login
(claude/codex/grok/gemini/opencode) with the isolator env set.

No tokens are copied. Account 1 stays on the built-in home. Headless
and unit-test paths return the command instead of spawning a terminal.
Settings MCP still targets the built-in family row. Extra custom
agents whose spec.env sets CLAUDE_CONFIG_DIR, CODEX_HOME, GROK_HOME,
GEMINI_CONFIG_DIR, or OPENCODE_CONFIG_DIR now receive the same server
on upsert and lose it on remove.

Claude extra homes only get enabledPlugins; server defs stay in the
shared ~/.claude.json. Auth files are never copied.
Custom agents whose spec.env sets a family isolator now have a Sign in
card on the Agents page. That opens the official CLI login
(claude/codex/grok/gemini/opencode) with the isolator env set.

No tokens are copied. Account 1 stays on the built-in home. Headless
and unit-test paths return the command instead of spawning a terminal.
@Adam-Dalloul
Adam-Dalloul force-pushed the remaining-quota-honest-panel branch from 3b55c9f to cf69039 Compare October 11, 2026 15:17
@Adam-Dalloul Adam-Dalloul changed the title Show remaining subscription from live official CLI payloads feat(usage): show remaining quota for the current agent account Oct 11, 2026
@Adam-Dalloul Adam-Dalloul changed the title feat(usage): show remaining quota for the current agent account feat(usage): show account-specific remaining subscription quota Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants